﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using XMK.Framework.DataAccess;
using XMK.Framework.Config;

namespace XMK.Tadong.DataSync.Biz
{
    public class DataSyncConfig
    {
        public static readonly DbProvider TadongDbProvider;
        public static readonly string SupplierId;
        public static readonly string RootDirectoryPath;

        public static readonly string XMKFileIndexPath;
        public static readonly string TeamFileIndexPath;

        static DataSyncConfig()
        {
            //推荐使用根据Web.Config中的connectionStrings配置节的name获取数据库实现
            TadongDbProvider = ConfigHelper.GetDbProvider("TadongDbConn");
            SupplierId = XMK.Utils.ConfigHelper.GetAppSettingValue("SupplierId", "[XMK-]");
            RootDirectoryPath = XMK.Utils.ConfigHelper.GetAppSettingValue("rootDirectory", @"D:\TaDongDoc\");

            XMKFileIndexPath = XMK.Utils.ConfigHelper.GetAppSettingValue("xmkfileindexPath", @"d:\tadong\xmkfileindex_tmp");
            TeamFileIndexPath = XMK.Utils.ConfigHelper.GetAppSettingValue("teamfileindexPath", @"d:\tadong\teamfileindex");
        }
    }
}
